package com.parfinex.java.phase1.module2.task10;

/**
 * @version 1.0
 * @author: Li Jiahui
 * @date: 2020/10/24 13:15
 */
public class DirectionUseTest {
    public static void test1(String str){
        switch (str){
            case "up":
                System.out.println("抬头望明月！");break;
            case "down":
                System.out.println("低头思故乡！");break;
            case "向左":
                System.out.println("左牵黄");break;
            case "向右":
                System.out.println("右擎苍");break;
            default:
                System.out.println("没有这样的方法哦！");
        }
    }
    public static void test2(DirectionEnum de){
        switch (de){
            case UP:
                System.out.println("抬头望明月！");break;
            case DOWN:
                System.out.println("低头思故乡！");break;
            case LEFT:
                System.out.println("左牵黄");break;
            case RIGHT:
                System.out.println("右擎苍");break;
            default:
                System.out.println("没有这样的方法哦！");
        }
    }
    public static void main(String[] args){
        DirectionUseTest.test1(Direction.UP.getDesc());
        System.out.println("_____________________--");
        DirectionUseTest.test2(DirectionEnum.DOWN);

    }
}
